package UVA;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.util.HashMap;
import java.util.Scanner;

/*
 * @Author Josh Lear
 * @Date 4-15-2014
 * @Problem ad-hoc, mechanics
 */
public class UVA_12250 {
    public static void main (String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(
                System.out));
        HashMap<String, String> map = new HashMap<String, String>();
        map.put("HELLO", "ENGLISH");
        map.put("HOLA", "SPANISH");
        map.put("HALLO", "GERMAN");
        map.put("BONJOUR", "FRENCH");
        map.put("CIAO", "ITALIAN");
        map.put("ZDRAVSTVUJTE", "RUSSIAN");
        int current = 1;
        while (true) {
            String cur = sc.nextLine();
            if (cur.equals("#")) {
                break;
            }
            bw.write("Case " + current + ": ");
            current++;
            if (map.containsKey(cur)) {
                bw.write(map.get(cur) + "\n");
            } else {
                bw.write("UNKNOWN\n");

            }
        }
        bw.flush();
        sc.close();
    }
}
